var pageNo = 1;
var allPage = 10;
var pageSize = 5;
function changePage(page) {
	pageNo = page;
}

$(document).ready(function() {
	search();
})
function search() {
	$.ajax({
		type : "POST",
		async : true,
		data : {
			search : $('#searchInfo').val(),
			pageNo : pageNo,
			pageSize : pageSize
		},
		dataType : "json",
		url : getContextPath() + "/content/getSearcInfo",
		success : function(data) {
			console.log(data);
			var totalNum = parseInt(data.searchNum);
			allPage = Math.ceil(totalNum / pageSize);
			var tpl = $('#searchTpl').html();
			var html = juicer(tpl, data);
			$("#page").html(html);
			callPageShow('pagination', pageNo, allPage, search, changePage);
		},
		error : function() {
			alert("网络错误");
		}
	});
}